#ifndef DATABASE_H
#define DATABASE_H
#include <QWidget>
#include <fstream>
#include <iostream>
#include "ui_Database.h"

class DatabaseWindow : public QWidget {
    Q_OBJECT
public:
    DatabaseWindow(QWidget* parent = nullptr);
    ~DatabaseWindow();
    std::string getUsername();
    std::string getPassword();
    std::string getAddress();
    void writeToFile(const std::string& username, const std::string& password, const std::string& address);
    void readFromFile();


signals:
    void databaseSuccessful();

private slots:
    void on_pushButtonConfirm_clicked();

private:
    Ui::DatabaseWindow* ui;
    std::string usernameStr;
    std::string passwordStr;
    std::string addressStr;
};
#endif // DATABASE_H